/**
 * 
 */
package org.extdev.libraries.ltr;

import java.nio.DoubleBuffer;
import java.nio.IntBuffer;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;
import com.sun.jna.ptr.IntByReference;

/**
 * @author LAP
 *
 */
public interface LTR11APILibrary extends Library {
	public static final String JNA_LIBRARY_NAME = "ltr11api";
	public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(LTR11APILibrary.JNA_LIBRARY_NAME);
	public static final LTR11APILibrary INSTANCE = (LTR11APILibrary)Native.loadLibrary(LTR11APILibrary.JNA_LIBRARY_NAME, LTR11APILibrary.class);
	
	int LTR11_Close(LTR11.ByReference hnd);
	
	int LTR11_GetConfig(LTR11.ByReference hnd);
	
	int LTR11_GetFrame(LTR11.ByReference hnd, IntBuffer buffer);
	
	int LTR11_Init(LTR11.ByReference hnd);
	
	int LTR11_Open(LTR11.ByReference hnd, int netAddr, short netPort, String crateSn, int slotNum);
	
	int LTR11_ProcessData(LTR11.ByReference hnd, IntBuffer src, DoubleBuffer dest, IntByReference size, boolean calibr, boolean volt);
	
	int LTR11_SetADC(LTR11.ByReference hnd);
	
	int LTR11_Start(LTR11.ByReference hnd);
	
	int LTR11_Stop(LTR11.ByReference hnd);
}
